# -*- coding:utf-8 -*-
__author__ = 'weikai'
from request_cic.login import *
from request_cic.vhlPlatform import *
import json
import traceback
from getCode import get_citycode
from request_cic.updateCarInfo import update_car_info
searchVin={'VIN_NO':'LNBMDBAF5EU121193','INSURE_CAR_ID':58}

#car信息修复
#requesteicc=logincic()
def repairCar(requesteicc,vin):
    VIN_NO=vin['vinNo']
    INSURE_CAR_ID=vin['insureCarId']

    dt=getCarInof(requesteicc,VIN_NO)
    dt['cityCode'] = get_citycode(dt['gCPlateNo'])


    update_car_info(dt,INSURE_CAR_ID)
    vin['custName']=dt['hCAppNme']
    vin['plateNumber']=dt['gCPlateNo']
    vin['vehicleBrand']=dt['gCNoticeType']
    vin['firstRegister']=dt['CFstRegYm']
    vin['engineNo']=dt['CEngNo']
    vin['cityCode'] = dt['cityCode']




#repairCar(searchVin)